/*
 * Copyright (c) 2023 vitasystems GmbH
 *
 * This file is part of project EHRbase Migration Tool
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.ehrbase.migration.exporter.v0.jooq.pg.tables.records;

import java.util.UUID;
import org.ehrbase.migration.exporter.v0.jooq.pg.tables.AttestedView;
import org.jooq.Field;
import org.jooq.Record11;
import org.jooq.Record2;
import org.jooq.Row11;
import org.jooq.impl.UpdatableRecordImpl;

/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({"all", "unchecked", "rawtypes"})
public class AttestedViewRecord extends UpdatableRecordImpl<AttestedViewRecord>
        implements Record11<UUID, UUID, String, String, String, byte[], byte[], String, UUID, String, Short> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>ehr.attested_view.id</code>.
     */
    public void setId(UUID value) {
        set(0, value);
    }

    /**
     * Getter for <code>ehr.attested_view.id</code>.
     */
    public UUID getId() {
        return (UUID) get(0);
    }

    /**
     * Setter for <code>ehr.attested_view.attestation_id</code>.
     */
    public void setAttestationId(UUID value) {
        set(1, value);
    }

    /**
     * Getter for <code>ehr.attested_view.attestation_id</code>.
     */
    public UUID getAttestationId() {
        return (UUID) get(1);
    }

    /**
     * Setter for <code>ehr.attested_view.alternate_text</code>.
     */
    public void setAlternateText(String value) {
        set(2, value);
    }

    /**
     * Getter for <code>ehr.attested_view.alternate_text</code>.
     */
    public String getAlternateText() {
        return (String) get(2);
    }

    /**
     * Setter for <code>ehr.attested_view.compression_algorithm</code>.
     */
    public void setCompressionAlgorithm(String value) {
        set(3, value);
    }

    /**
     * Getter for <code>ehr.attested_view.compression_algorithm</code>.
     */
    public String getCompressionAlgorithm() {
        return (String) get(3);
    }

    /**
     * Setter for <code>ehr.attested_view.media_type</code>.
     */
    public void setMediaType(String value) {
        set(4, value);
    }

    /**
     * Getter for <code>ehr.attested_view.media_type</code>.
     */
    public String getMediaType() {
        return (String) get(4);
    }

    /**
     * Setter for <code>ehr.attested_view.data</code>.
     */
    public void setData(byte[] value) {
        set(5, value);
    }

    /**
     * Getter for <code>ehr.attested_view.data</code>.
     */
    public byte[] getData() {
        return (byte[]) get(5);
    }

    /**
     * Setter for <code>ehr.attested_view.integrity_check</code>.
     */
    public void setIntegrityCheck(byte[] value) {
        set(6, value);
    }

    /**
     * Getter for <code>ehr.attested_view.integrity_check</code>.
     */
    public byte[] getIntegrityCheck() {
        return (byte[]) get(6);
    }

    /**
     * Setter for <code>ehr.attested_view.integrity_check_algorithm</code>.
     */
    public void setIntegrityCheckAlgorithm(String value) {
        set(7, value);
    }

    /**
     * Getter for <code>ehr.attested_view.integrity_check_algorithm</code>.
     */
    public String getIntegrityCheckAlgorithm() {
        return (String) get(7);
    }

    /**
     * Setter for <code>ehr.attested_view.thumbnail</code>.
     */
    public void setThumbnail(UUID value) {
        set(8, value);
    }

    /**
     * Getter for <code>ehr.attested_view.thumbnail</code>.
     */
    public UUID getThumbnail() {
        return (UUID) get(8);
    }

    /**
     * Setter for <code>ehr.attested_view.uri</code>.
     */
    public void setUri(String value) {
        set(9, value);
    }

    /**
     * Getter for <code>ehr.attested_view.uri</code>.
     */
    public String getUri() {
        return (String) get(9);
    }

    /**
     * Setter for <code>ehr.attested_view.sys_tenant</code>.
     */
    public void setSysTenant(Short value) {
        set(10, value);
    }

    /**
     * Getter for <code>ehr.attested_view.sys_tenant</code>.
     */
    public Short getSysTenant() {
        return (Short) get(10);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record2<UUID, Short> key() {
        return (Record2) super.key();
    }

    // -------------------------------------------------------------------------
    // Record11 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row11<UUID, UUID, String, String, String, byte[], byte[], String, UUID, String, Short> fieldsRow() {
        return (Row11) super.fieldsRow();
    }

    @Override
    public Row11<UUID, UUID, String, String, String, byte[], byte[], String, UUID, String, Short> valuesRow() {
        return (Row11) super.valuesRow();
    }

    @Override
    public Field<UUID> field1() {
        return AttestedView.ATTESTED_VIEW.ID;
    }

    @Override
    public Field<UUID> field2() {
        return AttestedView.ATTESTED_VIEW.ATTESTATION_ID;
    }

    @Override
    public Field<String> field3() {
        return AttestedView.ATTESTED_VIEW.ALTERNATE_TEXT;
    }

    @Override
    public Field<String> field4() {
        return AttestedView.ATTESTED_VIEW.COMPRESSION_ALGORITHM;
    }

    @Override
    public Field<String> field5() {
        return AttestedView.ATTESTED_VIEW.MEDIA_TYPE;
    }

    @Override
    public Field<byte[]> field6() {
        return AttestedView.ATTESTED_VIEW.DATA;
    }

    @Override
    public Field<byte[]> field7() {
        return AttestedView.ATTESTED_VIEW.INTEGRITY_CHECK;
    }

    @Override
    public Field<String> field8() {
        return AttestedView.ATTESTED_VIEW.INTEGRITY_CHECK_ALGORITHM;
    }

    @Override
    public Field<UUID> field9() {
        return AttestedView.ATTESTED_VIEW.THUMBNAIL;
    }

    @Override
    public Field<String> field10() {
        return AttestedView.ATTESTED_VIEW.URI;
    }

    @Override
    public Field<Short> field11() {
        return AttestedView.ATTESTED_VIEW.SYS_TENANT;
    }

    @Override
    public UUID component1() {
        return getId();
    }

    @Override
    public UUID component2() {
        return getAttestationId();
    }

    @Override
    public String component3() {
        return getAlternateText();
    }

    @Override
    public String component4() {
        return getCompressionAlgorithm();
    }

    @Override
    public String component5() {
        return getMediaType();
    }

    @Override
    public byte[] component6() {
        return getData();
    }

    @Override
    public byte[] component7() {
        return getIntegrityCheck();
    }

    @Override
    public String component8() {
        return getIntegrityCheckAlgorithm();
    }

    @Override
    public UUID component9() {
        return getThumbnail();
    }

    @Override
    public String component10() {
        return getUri();
    }

    @Override
    public Short component11() {
        return getSysTenant();
    }

    @Override
    public UUID value1() {
        return getId();
    }

    @Override
    public UUID value2() {
        return getAttestationId();
    }

    @Override
    public String value3() {
        return getAlternateText();
    }

    @Override
    public String value4() {
        return getCompressionAlgorithm();
    }

    @Override
    public String value5() {
        return getMediaType();
    }

    @Override
    public byte[] value6() {
        return getData();
    }

    @Override
    public byte[] value7() {
        return getIntegrityCheck();
    }

    @Override
    public String value8() {
        return getIntegrityCheckAlgorithm();
    }

    @Override
    public UUID value9() {
        return getThumbnail();
    }

    @Override
    public String value10() {
        return getUri();
    }

    @Override
    public Short value11() {
        return getSysTenant();
    }

    @Override
    public AttestedViewRecord value1(UUID value) {
        setId(value);
        return this;
    }

    @Override
    public AttestedViewRecord value2(UUID value) {
        setAttestationId(value);
        return this;
    }

    @Override
    public AttestedViewRecord value3(String value) {
        setAlternateText(value);
        return this;
    }

    @Override
    public AttestedViewRecord value4(String value) {
        setCompressionAlgorithm(value);
        return this;
    }

    @Override
    public AttestedViewRecord value5(String value) {
        setMediaType(value);
        return this;
    }

    @Override
    public AttestedViewRecord value6(byte[] value) {
        setData(value);
        return this;
    }

    @Override
    public AttestedViewRecord value7(byte[] value) {
        setIntegrityCheck(value);
        return this;
    }

    @Override
    public AttestedViewRecord value8(String value) {
        setIntegrityCheckAlgorithm(value);
        return this;
    }

    @Override
    public AttestedViewRecord value9(UUID value) {
        setThumbnail(value);
        return this;
    }

    @Override
    public AttestedViewRecord value10(String value) {
        setUri(value);
        return this;
    }

    @Override
    public AttestedViewRecord value11(Short value) {
        setSysTenant(value);
        return this;
    }

    @Override
    public AttestedViewRecord values(
            UUID value1,
            UUID value2,
            String value3,
            String value4,
            String value5,
            byte[] value6,
            byte[] value7,
            String value8,
            UUID value9,
            String value10,
            Short value11) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        value7(value7);
        value8(value8);
        value9(value9);
        value10(value10);
        value11(value11);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached AttestedViewRecord
     */
    public AttestedViewRecord() {
        super(AttestedView.ATTESTED_VIEW);
    }

    /**
     * Create a detached, initialised AttestedViewRecord
     */
    public AttestedViewRecord(
            UUID id,
            UUID attestationId,
            String alternateText,
            String compressionAlgorithm,
            String mediaType,
            byte[] data,
            byte[] integrityCheck,
            String integrityCheckAlgorithm,
            UUID thumbnail,
            String uri,
            Short sysTenant) {
        super(AttestedView.ATTESTED_VIEW);

        setId(id);
        setAttestationId(attestationId);
        setAlternateText(alternateText);
        setCompressionAlgorithm(compressionAlgorithm);
        setMediaType(mediaType);
        setData(data);
        setIntegrityCheck(integrityCheck);
        setIntegrityCheckAlgorithm(integrityCheckAlgorithm);
        setThumbnail(thumbnail);
        setUri(uri);
        setSysTenant(sysTenant);
        resetChangedOnNotNull();
    }
}
